#  match case 用法
score = 'B'
if score == 'A':
    print('score is A.')
elif score =='B':
    print('score is B.')
elif score == 'C':
    print('score is C.')
else:
    print('invalid score.')

# match 语句
score = 'B'

match score:
    case 'A':
        print('score is A.')
    case 'B':
        print('score is B')
    case 'C':
        print('score is C')
    case _:     # 表示匹配到其他的情况
        print('score is ???')
